# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pbkdf2
_pkgname=pbkdf2
pkgver=1.3
pkgrel=5
pkgdesc='Password-based key derivation function PBKDF2.'
url='https://pypi.org/project/pbkdf2/#files'
arch=('any')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools' 'python2-crypto')
optdepends=('python2-crypto: to make use of PyCrypto`s HMAC and SHA')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('1297950d045f9b56f5eb9f771fe65091802c1f12f090a8a80fb5e36bfa10f1c1ac3b9dc8088f4a640b840fb7073aadd3fdf39f3979118046ba5cde477d071244')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

